home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-06-16 | 925 b | 68 lines | [TEXT/MPS ] |
- ;
- ;
- DoAddrErr proc export
- move #1,(sp)
- rts
- endp
-
- DoillErr proc export
- dc.w $05FF
- rts
- endp
-
- DoPrivErr proc export
- and.w #$DFFF,sr
- and.w #$DFFF,sr
- rts
- endp
-
- DoTraceErr proc export
- or.w #$8000,sr
- rts
- endp
-
- DoFTrap proc export
- dc.w $FFFF
- rts
- endp
-
- DoPack1 proc export
- dc.w $A9E8 ;_Pack1
- rts
- endp
-
- ;
- ; patch to GetResource - syntax is:
- ;
- ;FUNCTION GetResource(theType: ResType;theID: INTEGER): Handle;
- ; INLINE $A9A0;
- ;
- ; we stomp on loads of resources of types 'PACK' and 'CODE'
- ;
-
- import saveTrap:DATA
-
- GetResPatch proc export
- ; DC.W $A9FF
- move.l 8(sp),d0
- cmp.l #'PACK',d0
- beq.s stomp
- cmp.l #'CODE',d0
- beq.s stomp
- movea.l $A78, A0 ; ApplScratch
- jmp (A0)
- rts
- stomp
- moveq #0,d0 ; set the handle to NIL
- move.l d0,12(sp)
- move.l (sp),a0 ; get the return address
- adda.l #12,sp
- move #-192,d0 ; resource not found
- move d0,$A60 ; ResErr
- jmp (a0)
- DC.B $C5 ; 'G'
- DC.B 'etResPatch'
- endp
-
- end
-